#ifndef ITEMEDITORWINDOW_H
#define ITEMEDITORWINDOW_H

#include <QWidget>
#include <QTextEdit>
#include <QVBoxLayout>
#include <QCloseEvent>

class ClipboardStorage; // 前向声明 ClipboardStorage

class ItemEditorWindow : public QWidget {
    Q_OBJECT

public:
    ItemEditorWindow(const QString& textContent, size_t index, ClipboardStorage* storage, QWidget* parent = nullptr);

protected:
    void closeEvent(QCloseEvent* event) override; // 重写 closeEvent

private:
    QTextEdit *textEdit;          // 文本编辑框
    size_t index;                 // 项索引
    ClipboardStorage* storage;    // 指向存储的指针
};

#endif // ITEMEDITORWINDOW_H
